Feature/improve code