Almost running fine code