re-idented some code