Simplified part of less code