try-catch was useless. Also better code style