clean code
facebook implementation