use selectOne instead on select
fix some code formatting